/*
 * 作者:熊猫
 * 日期:2017 - 3 - 15 3 - 37 - 52
 *
 */

package net.lainiao.other.demo4;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * Created by Administrator on 2017/3/15.
 */
public class Main {
    public static void main(String[] args) {
        SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date now=new Date();
        System.out.println(format.format(now));
        System.out.println(now.getTime());
        now.setTime(now.getTime()+1000);
        System.out.println(now.getTime());
        System.out.println(format.format(now));
        long res= TimeUnit.NANOSECONDS.convert(1,TimeUnit.SECONDS);
        System.out.println(res);
    }
}
